## These materials are adapted from the excellent book ## "R in Action" by R. Kabakoff ## This book is by the creator of the www.statmethods.net website ## The book contains a wealth of useful information about R, ## and is highly recommended. ## How to update your R installation Save your "Rprofile.site" file if you are using one. ## 1. If it does not already exist, ## create a "holding directory" for your package information ## I used D:/Holder in the example below ## Then ## 1. Start up your older version of R ## Run the following two lines of code in the older version oldip <- installed.packages()[,1] save(oldip, file="D:/Holder/installedPackages.Rdata") ## Close the older version ## If you are using an Rprofile.site file, copy it into the new installation ## Start up the newly installed version ## From New Version, run the following 4 lines of code ## You will need to be connected to the internet load("D:/Holder/installedPackages.Rdata") newip <- installed.packages()[,1] for(i in setdiff(oldip, newip)) install.packages(i) ## All of your packages will/should install and update to the latest version ## However, if any of your packages are not archived at the R website, you will need to ## go to the website where they are available and download them separately. These ## should be mentioned in an error message. ##